package cn.csust.net2.manager.client.module;

import com.google.gwt.core.client.GWT;
import cn.csust.net2.manager.client.app.App;
import cn.csust.net2.manager.client.panel.StudentInformationPanel;
import cn.csust.net2.manager.client.ux.ServiceCallback;
import cn.csust.net2.manager.shared.po.Student;
import cn.csust.net2.manager.shared.service.StudentInformationService;
import cn.csust.net2.manager.shared.service.StudentInformationServiceAsync;
import cn.csust.net2.manager.shared.util.ClassForNameAble;


@ClassForNameAble
public class StudentInformation extends BaseModule{
	protected StudentInformationServiceAsync service = GWT.create(StudentInformationService.class);
	public StudentInformation(){
		this.setText("学生基本信息");
		this.setLayoutOnChange(true);
		this.setId("学生基本信息");
		this.setClosable(true);
		service.testEdit(new ServiceCallback<Boolean>() {
			
			@Override
			public void onSuccess(Boolean result) {
				StudentInformationPanel panel = new StudentInformationPanel((Student)App.getUser(),result);
				StudentInformation.this.add(panel);
				StudentInformation.this.addStyleName("pad-text");
				
			}
		});
		
	}
}
